package team.scau.laboratory_repair.modules.po;

import javax.persistence.*;

import lombok.*;
import team.scau.laboratory_repair.common.base.BaseModel;

import java.sql.Timestamp;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "lab_wechat_user")
public class WechatUser extends BaseModel {

    @Builder
    public WechatUser(Long id, Timestamp createTime, Timestamp updateTime, Timestamp deleteTime, Boolean valid, String number, String nickname, Boolean subscribe, String phoneNumber, String name, String openid, String password, Long userId, Integer userType) {
        super(id, createTime, updateTime, deleteTime, valid);
        this.number = number;
        this.nickname = nickname;
        this.subscribe = subscribe;
        this.phoneNumber = phoneNumber;
        this.name = name;
        this.openid = openid;
        this.password = password;
        this.userId = userId;
        this.userType = userType;
    }

    @Column
    private String number;
    @Column
    private String nickname;
    @Column(columnDefinition = "tinyint")
    private Boolean subscribe;
    @Column
    private String phoneNumber;
    @Column
    private String name;
    @Column
    private String openid;
    @Column
    private String password;
    @Column
    private Long userId;
    @Column(columnDefinition = "tinyint")
    private Integer userType;
}
